﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace HYBatchPrinter
{
	public partial class SaveAsForm : System.Windows.Forms.Form
	{
		public SaveAsForm(ISettingNameOperation settingNameOperation)
		{
			this.InitializeComponent();
			this.m_settingNameOperation = settingNameOperation;
			this.newNameTextBox.Text = this.m_settingNameOperation.Prefix + this.m_settingNameOperation.SettingCount.ToString();
		}

		private void okButton_Click(object sender, EventArgs e)
		{
			this.m_settingNameOperation.SaveAs(this.newNameTextBox.Text);
			this.m_settingNameOperation.SettingName = this.newNameTextBox.Text;
		}

		private ISettingNameOperation m_settingNameOperation;
	}
}
